package com.cw.controller;


import com.cw.annotation.*;
import com.cw.common.api.ResultObject;
import com.cw.common.constant.*;
import com.cw.entity.*;
import com.cw.service.*;
import io.swagger.annotations.*;
import java.util.*;
import org.springframework.beans.factory.annotation.*;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RestController;

/**
* @author ly
* @since 2021-09-07
*/
@Api(tags = {"登记记录表"})
@RestController
@RequestMapping("/register-record")

    public class RegisterRecordController {

    @Autowired
    private IRegisterRecordService targetService;


    @GetMapping("/saveYQRegister")
    @ApiOperation("新建")
    public ResultObject saveYQRegister(@RequestParam String preId, String state) {
        return ResultObject.successReturn(targetService.insertRegisterRecord(preId, state));
    }
    @GetMapping("/CancelYQRegister")
    @ApiOperation("取消")
    public ResultObject CancelYQRegister(@RequestParam String preId){
        return  ResultObject.successReturn(targetService.delectRegisterRecord(preId));
    }
    @GetMapping("/selectYQRegister")
    @ApiOperation("查询操作人姓名跟ID")
    public ResultObject selectYQRegister(@RequestParam String preId){
        return  ResultObject.successReturn(targetService.selectReginterRecord(preId));
    }

}

